import { http } from "../../utils/http"

export const getFollow = () => async (dispatch) => {
  const { data } = await http.get("/user/followings")
  console.log(data)
  dispatch({ type: "GET_FOLLOW", payload: data.data })
}
export const getCollect = () => async (dispatch) => {
  const { data } = await http.get("/article/collections")
  console.log(data)
  dispatch({ type: "GET_COLLECT", payload: data.data })
}

export const getHistory = () => async (dispatch) => {
  const { data } = await http.get("/user/histories")
  console.log(data)
  dispatch({ type: "GET_HISTORY", payload: data.data })
}
